﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace FoxCommerce.MVC.Domain.Entities
{
    public partial class Customer
    {
        [Required, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
        public Guid CustomerGUID { get; set; }

        [Required(ErrorMessage = "E-Posta adresi gerekli")]
        [DisplayName("E- Posta")]
        [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}",
            ErrorMessage = "Lütfen geçerli eposta adresi giriniz..!")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        public string UserName { get; set; }
        public string PasswordHash { get; set; }
        public string AdminComment { get; set; }
        public string Signature { get; set; }

        public bool Active { get; set; }
        public bool Deleted { get; set; }
        public bool IsAdmin { get; set; }
        public bool IsGuest { get; set; }

        [DataType(DataType.DateTime)]
        public DateTime ReqistrationDate { get; set; }

        [DataType(DataType.DateTime)]
        public DateTime DateOfBirth { get; set; }

        public int BillingAdressID { get; set; }
        public int ShippingAdressID { get; set; }

        public int LanguageID { get; set; }
        [ForeignKey("LanguageID")]
        public virtual Language Language { get; set; }

        public int CurrencyID { get; set; }
        [ForeignKey("CurrencyID")]
        public virtual Currency Currency { get; set; }

        public int LastPaymentMethodID { get; set; }
        [ForeignKey("LastPaymentMethodID")]
        public virtual PaymentMethod LastPaymentMethod { get; set; }

        public int CustomerRoleID { get; set; }
        [ForeignKey("CustomerRoleID")]
        public virtual CustomerRole CustomerRole { get; set; }

        public virtual List<ProductReview> ProductReviews { get; set; }
        public virtual List<ProductRating> ProductRatings { get; set; }
    }
}